package com.example.exercise.socket;

/**
 * netty服务端
 */
public class NettyServerSystem {

    private NettyServer nettyServer;

    private static NettyServerSystem nettyServerSystem = null;

    private NettyServerSystem() {
        nettyServer = new NettyServer();
    }

    //单利模式创建对象
    public static NettyServerSystem getSingleton() {
        if (nettyServerSystem == null) {
            nettyServerSystem = new NettyServerSystem();
        }
        return nettyServerSystem;
    }

    public void startNettyServer() {
        nettyServer.start(8088);
    }
}
